package transform;

import java.io.*;

public class TransformTest1 {
    public static void main(String[] args) {
        // 得到文件原始字符
        try {
            InputStream is = new FileInputStream("C:\\Users\\zjd\\IdeaProjects\\java\\src\\itheima.06.txt");
            // 转换为想要的字符集形式
            Reader isr = new InputStreamReader(is,"GBK");
            // 包装成字符缓冲流
            BufferedReader bw = new BufferedReader(isr);
            String leng;
            while ((leng = bw.readLine()) != null){
                System.out.println(leng);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
